const joi = require('@hapi/joi')

//alphanum()只包含字母和数字s

//定义name和alias的验证规则
const name = joi.string().required()
const alias = joi.string().alphanum().required()

//定义id验证规则
const id = joi.number().integer().min(1).required()

exports.add_cate_sechma = {
  body: {
    name, alias
  }
}

exports.delete_cate_sechma = {
  params: {
    id
  }
}

exports.get_cate_sechma = {
  params: {
    id
  }
}

exports.update_cate_sechma = {
  body: {
    id, name, alias
  }
}